/*
 *  static.h
 *  EPPI-0.0
 *
 *  Created by Juan Carlos Garcia Orden on 15/11/07.
 *
 */

#ifndef _static_h_
#define _static_h_

#include <iostream>
#include "analysis.h"
#include "COMPONENTS/component.h"
#include "simulation.h"
//#include "lmx_nlsolvers.h"
//#include "commonutil.h"

using namespace std;

extern int rankk;

class Static : public Analysis
{
public:
	string linSolver;
	string nlSolver;
	int numericTangFlag;
	vector <double> vTime;
    int maxIter;
    double tol;
//	string gravDir;						/** Gravity direction */
//	double grav;						/** Gravity value */
/*	Data members from the base class Analysis
	string name;
	string type,
	int dim;
	bool haveToRebuild;
	bool changeLoads;
	Simulation* parentSim;
	bool isVelNeeded;
	string graphicsFormat;
 	bool augLagFlag;
 	bool augConvergence;
  	bool augConvergenceTot;
	int augIter;
	int maxIterLambda;
	int integratorType;
	bool projFlag;
	int autoProjFlag;
 	string autoProjType;
 	bool implicitFlag;
	bool lumpedMassFlag;
*/

public:
	Static();
        Static(ifstream &, string &, string &, int, string &, string &, double &, Simulation*);
	~Static(){}
	
	/** Virtual functions from base */
	string getLinSolver()	{ return(linSolver); }
	string getNlSolver()	{ return(nlSolver); }
	string getIntegrator(){ return(""); }
	double  getTIni(){ return(0.0); }
	double  getTEnd(){ return(0.0); }
	double  getTIncre(){ return(0.0); }
	double  getBeta(){ return(0.0); }
	double  getGamma(){ return(0.0); }
	double  getAlpha(){ return(0.0); }
	double calculate();
	
	/** Local functions */
	void createTimeVec(ifstream &); // edit
        void calcVel(void);

	/** Friend functions */
	friend string getStringHead(const string& str);
//	friend double lTwoNorm(const vector<double>& v1);
};

#endif
